package dbhandler;

import evthandler.EventMessage;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Casper, Dennis, Jackie, Jakob
 * @version 1.00
 */
public class UserLevel{

    private String levelName;

    /**
     *
     * @param levelNo
     */
    public UserLevel(int levelNo) {
        try {
        ResultSet rs = DbCon.getInstance().executeQuery("SELECT levelName FROM userLvl WHERE levelNo=" + levelNo);
            while (rs.next()) {
                levelName = rs.getString("levelName");
            }
        } catch (SQLException ex) {
            new EventMessage("SQL error in UserLevel", "There was an error performing the sql inquery\n").showException(ex);
        }
    }

    /**
     *
     * @return
     */
    public String getLevelName() {
        return levelName;
    }
}
